

{header}
<!-- Select2 -->
<link rel="stylesheet" href="/static/admin/bower_components/select2/dist/css/select2.min.css">

<script src="/static/admin/bower_components/jquery/dist/jquery.min.js"></script>
<script src="/static/admin/bower_components/ckeditor/ckeditor.js"></script>
<script>
    $(function () {
        CKEDITOR.replace('editor1')
    })
</script>
{/header}

{content}
<form action="/admin/article/add" method="post">

<div class="box box-default">
    <div class="box-header with-border">
        <h3 class="box-title">Select2</h3>
    </div>
    <!-- /.box-header -->
    <div class="box-body">
        <div class="row">
            <div class="col-md-6">

                <div class="form-group">
                    <label>文章标题</label>
                    <input type="text" name="title" class="form-control" placeholder="文章标题必填，50个字符以内">
                </div>

                <div class="form-group">
                    <label>文章分类</label>
                    <select class="form-control select2" style="width: 100%;" name="cate_id">
                        <option selected="selected" value="0">默认分类</option>
                        {loop $cate in $catelist}
                        <option value="{$cate['id']}">{$cate['name']}</option>
                        {/loop}
                    </select>
                </div>


                <div class="form-group">
                    <label>文章内容</label>
                    <textarea id="editor1" name="content" rows="10" cols="80">
                    </textarea>
                </div>
            </div>
        </div>
        <!-- /.row -->
    </div>
    <!-- /.box-body -->
    <div class="box-footer">
        <input type="reset" class="btn btn-default" value="重填"> <input type="submit" class="btn btn-primary" value="添加">
    </div>
</div>

</form>
{/content}